package com.k2091.washcar.service;

import com.k2091.washcar.entity.CarOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.k2091.washcar.entity.FormInline;

import java.text.Format;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author author
 * @since 2021-06-01
 */
public interface ICarOrderService extends IService<CarOrder> {

    //查询所有订单
    List<CarOrder> selectCarOrder(FormInline formInline);

    //查询所有未接订单
    List<CarOrder> selectUnreceiveOrder();

    //添加订单
    int addOrder(CarOrder carOrder);

    //洗车员接单
    int updateOrder(Long orderId,Long cleanId);

    //洗车员完成订单
    int updateOrderStatus(Long orderId,Long cleanId);

    //用户确认订单完成  完成后 洗车员余额增加
    int orderFinish(Long orderId,String rank);

    //用户评价订单
    int userRank(String rank,Long orderId);

    //查询某洗车员的所有订单
    List<CarOrder> selectOrderByCleaner(Long cleanerId);

    //查看某用户所有未评价订单
    List<CarOrder> userUnRank(Long userId);

    //查看某用户所有订单
    List<CarOrder> selectAllOrder(Long userId);
}
